package com.example.springbootdemo.bean;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Slf4j
@Scope("request")
@Component
public class BeanForRequest {
  @PreDestroy
  public void destroy(){
    log.info("request destroy");
  }

  @PostConstruct
  public void init(){
    log.info("request init");
  }
}
